package com.example.bloomfilterdemo;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA 2023.
 * Description:
 * User: homechen
 * Date: 2024-04-07
 * Time: 21:44
 */
@Configuration
public class RedissonConfig {
    @Bean
    public RedissonClient redissonConfig() {
        Config config = new Config();
        // 将 redis 配置信息保存到配置文件中
        config.useSingleServer().setAddress("redis://127.0.0.1:6379");
        return Redisson.create(config);
    }
}
